package juc.semaphore;

/**
 * 汽车线程
 */
public class Car extends Thread {
	
	private String carNo; // 车辆编号
	private Park park; // 停车场
	
	Car(String carNo, Park park) {
		this.carNo = carNo;
		this.park = park;
	}
	
	@Override
	public void run() {
		park.parking(carNo); // 停车
	}

}
